<?php
namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;

/**
 * 获取用户信息
 */
class UserMiddleware
{
    /**
     * @param Request $request
     * @param Closure $next
     * @return mixed
     */
    public function handle(Request $request, Closure $next)
    {
        $defaultUserinfo = app('DefaultUserinfo');
        $defaultUserinfo->needUserinfo = 1;

        return $next($request);
    }
}